package tfsIssueTracker;

import jetbrains.buildServer.issueTracker.AbstractIssueProviderFactory;
import jetbrains.buildServer.issueTracker.IssueFetcher;
import jetbrains.buildServer.issueTracker.IssueProvider;
import jetbrains.buildServer.issueTracker.IssueProviderType;
import jetbrains.buildServer.util.cache.EhCacheUtil;
import org.jetbrains.annotations.NotNull;

public class TfsIssueProviderFactory extends AbstractIssueProviderFactory {
    private final TfsExeWrapper wrapper;
    private final EhCacheUtil cache;

    public TfsIssueProviderFactory(@NotNull final IssueProviderType type, @NotNull IssueFetcher fetcher, @NotNull TfsExeWrapper wrapper, @NotNull EhCacheUtil cache) {
        super(type, fetcher);
        this.wrapper = wrapper;
        this.cache = cache;
    }

    @NotNull
    public IssueProvider createProvider() {
        return new TfsIssueProvider(myType, myFetcher, wrapper, cache);
    }
}